<template>
	<Modal
        v-model="show"
        width="auto"
        :title="title"
        @on-cancel="cancel">
        <slot></slot>
        <div slot="footer"></div>
    </Modal>
</template>

<script>
	export default {
		props: {
			title: {
				type: String,
				default: ''
			},
			isCancel: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				show: false
			}
		},
		methods: {
			showModal() {
				this.show = true;
			},
			hideModal() {
				this.show = false;
				this.cancel();
			},
			cancel() {
				if(this.isCancel) {
					this.$emit('cancel');
				}
			}
		}
	}
</script>

<style>
</style>